def manufacturer_id_to_hex(code: str) -> str:
    if len(code) != 3 or not code.isupper():
        raise ValueError("输入必须是三个大写字母组成的厂商代码")

    a, b, c = [ord(char) - 64 for char in code]
    man_id = a * 32 * 32 + b * 32 + c
    return f"0x{man_id:04X}"

# 示例用法
manufacturer_code = "FMT"
hex_id = manufacturer_id_to_hex(manufacturer_code)
print(f"厂商代码 {manufacturer_code} 的16进制ID是: {hex_id}")